import type { EChartsOption } from "echarts";

export function getOption3():EChartsOption {
  let value = 82.65;
  return  {
    title: {
      text: `${value} %`,
      left: 'center',
      top: 'center',
      textStyle:{
        color:'#ededed',
        fontSize:14
      }
    },
    legend: {
      bottom: '0%',
      left: 'center'
    },
    series: [
      {
        name: '外圆',
        type: 'pie',
        radius: [55, 35],
        silent: true,
        clockwise: true,
        startAngle: 90,
        label: {
          show:false
        },
        data: [
          {
            value: value,
            itemStyle: {
              color: {
                type: 'linear',
                x: 0,
                y: 0,
                x2: 0,
                y2: 1,
                colorStops: [
                  {
                    offset: 0,
                    color: '#a08a57', // 0% 处的颜色
                  },
                  {
                    offset: 1,
                    color: '#fac747', // 100% 处的颜色
                  },
                ],
                global: false, // 缺省为 false
              },
            },
          },
          {
            value: 100 - value,
            itemStyle: {
              color: 'rgba(76, 228, 230, 0.1)',
            },
          },
        ],
        z: 2,
        zlevel: 2,
      },
      {
        name: '内圆',
        type: 'pie',
        radius: [0, 30], //蓝色
        itemStyle: {
          shadowBlur: 20,
          shadowColor: '#000',
          color: {
            type: 'radial',
            x: 0.5,
            y: 0.5,
            r: 0.5,
            colorStops: [
              {
                offset: 0,
                color: '#a08a57', // 0% 处的颜色
              },
              {
                offset: 1,
                color: '#fac747', // 100% 处的颜色
              },
            ],
            global: false, // 缺省为 false
          },
        },
        legendHoverLink: false,
        label: {
          show: false,
        },
        data: [100],
        z: 3,
      },
    ],
  };
}
